package com.mc.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mc.dao.DepartmentMapper;
import com.mc.model.Department;
import com.mc.service.IDepartmentService;
@Service
public class DepartmentServiceImpl implements IDepartmentService {

	
	@Autowired private DepartmentMapper departmentMapper;
	@Override
	public int deleteByPrimaryKey(Integer dId) {
		// TODO Auto-generated method stub
		return departmentMapper.deleteByPrimaryKey(dId);
	}

	@Override
	public int insert(Department record) {
		// TODO Auto-generated method stub
		return departmentMapper.insert(record);
	}

	@Override
	public int insertSelective(Department record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public Department selectByPrimaryKey(Integer dId) {
		// TODO Auto-generated method stub
		return departmentMapper.selectByPrimaryKey(dId);
	}

	@Override
	public int updateByPrimaryKeySelective(Department record) {
		// TODO Auto-generated method stub
		return departmentMapper.updateByPrimaryKey(record);
	}

	@Override
	public int updateByPrimaryKeyWithBLOBs(Department record) {
		// TODO Auto-generated method stub
		return departmentMapper.updateByPrimaryKeyWithBLOBs(record);
	}

	@Override
	public int updateByPrimaryKey(Department record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<Department> selectalldepartment() {
		// TODO Auto-generated method stub
		return departmentMapper.selectalldepartment();
	}

	@Override
	public List<Department> selectbydtype(String type) {
		// TODO Auto-generated method stub
		return departmentMapper.selectbydtype(type);
	}
	

}
